package com.open.capacity.common.model;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@TableName("sign")
@EqualsAndHashCode(callSuper=true)
public class Sign extends Model<Sign> implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    @JsonSerialize(using= ToStringSerializer.class)
    private Integer id;

    /**
     * 用户id
     */
//    @TableField(value="nick_name")
//    @Excel(name = "用户id", height = 20, width = 30, isImportField = "true_st")
    private Long userId;

    @Excel(name = "用户昵称", height = 20, width = 30, isImportField = "true_st")
    private String nickName;

    /**
     * 签到时间
     */
    @JsonFormat(pattern = "HH:mm:ss",timezone = "GMT+8")
    @Excel(name = "签到时间", height = 20, width = 30, isImportField = "true_st")
    private String signin;

    /**
     * 签退时间
     */
    @JsonFormat(pattern = "HH:mm:ss",timezone = "GMT+8")
    @Excel(name = "签退时间", height = 20, width = 30, isImportField = "true_st")
    private String sigout;

    /**
     * 签到日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @Excel(name = "签到日期", height = 20, width = 30, isImportField = "true_st")
    private String time;

    /**
     * 签到状态
     */
    @Excel(name = "签到状态", height = 20, width = 30, isImportField = "true_st")
    private Integer istate;

    /**
     * 签退状态
     */
    @Excel(name = "签退状态", height = 20, width = 30, isImportField = "true_st")
    private Integer ostate;

    /**
     * 日报提交时间
     */
    private String cretim;

    /**
     * 日报提交状态
     */
    private String state;
}
